package src.main;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;


import src.data.HibernateUtil;

import src.rmi.ImplementationService;
import src.rmi.ImplementationServiceDTO;


public class Main {


	public static void main(String[] args) {
	

		
		HibernateUtil.registerPersistent();
		try {
			LocateRegistry.createRegistry(1099);
			new ImplementationService().initService();
			new ImplementationServiceDTO().initService();
			for(String s : Naming.list(""))
				System.out.println(s);
			System.out.println("Servicio remoto inicializado");
		} catch (RemoteException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (MalformedURLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}

}
